package org.chnxi.study.serialize.jackson;

import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.Data;

import java.util.List;

@Data
@JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class, property = "@id")
public class Student {

    private String name;


    private List<Teacher> teachers;

    private List<Book> books;

    @Override
    public String toString() {
        return JSONUtil.object2String(this);
    }
}
